#pragma once

class ResourcesDecode
{
public:
	ResourcesDecode(void);
	~ResourcesDecode(void);

	static ResourcesDecode *sharedDecode();


	void setXXTeaKey(const char *xxteaKey, int xxteaKeyLen, const char *xxteaSign, int xxteaSignLen);
	void cleanupXXTEAKeyAndSign();
	void *decodeData(unsigned char *buf, long *pSize);

private:
	bool m_xxteaEnabled;
	char *m_xxteaKey;
	int m_xxteaKeyLen;
	char *m_xxteaSign;
	int m_xxteaSignLen;

	static ResourcesDecode *m_resourcesDecode;
};

